﻿# This file is in the public domain. Feel free to modify it as a basis
# for your own screens.

#TEMP!
init python:
    
    #SILHOUETTE
    def silhouette_matrix (r,g,b,a=1.0):
             return im.matrix((0, 0, 0, 0, r, 
                               0, 0, 0, 0, g,
                               0, 0, 0, 0, b,
                               0, 0, 0, a, 0,))
    def silhouetted (filename, r,g,b, a = 1.0):
         return im.MatrixColor (Image (filename), silhouette_matrix (r,g,b,a))
    
    def show_tooltip(st, at):
         if astrid_action_pic:
             return tooltip, .1
         else:
             return Null()
             
    def refresh_screen():
        if refresh_flag is True:
            renpy.restart_interaction()
            refresh_flag = False
        
    
label open_cafe_employee_management:
    call screen gui_cafe_employees2
    
label open_cafe_main:
    call screen gui_cafe_main
    
label open_cafe_recipebook:
    call screen gui_cafe_recipebook

#######################
#CAFE - MAIN SCREEN
#######################
screen gui_cafe_main:
    python:
        print "Show the cafe main"
    
    imagemap:   
        ground "images/ui/cafe_ground.png"
        idle "images/ui/cafe_idle.png"
        hover "images/ui/cafe_hover.png"
        #insensitive "images/ui/eassign_ground.png"
        #selected_idle "images/dummy/prefs_selected_idle.png"
        #selected_hover "images/dummy/prefs_selected_hover.png"
        alpha False
        #insensitive "images/dummy/prefs_ground.png"
        
        hotspot (47, 120, 82, 85) action Jump("open_cafe_employee_management")
        hotspot (149, 122, 82, 85) action Jump("open_cafe_recipebook")
        hotspot (46, 228, 83, 87) action If(kyra_stats.unlocked == True, false = None) #TODO: Do for every other employee
        hotspot (149, 224, 82, 88) action Preference("skip", "all")
        hotspot (47, 332, 54, 57) action ShowMenu("preferences")
        hotspot (114, 332, 53, 57) action ShowMenu("save")
        hotspot (177, 332, 52, 57) action ShowMenu("load")
        hotspot (47, 411, 192, 80) action Jump("start_day")
        #hotspot (728, 8, 60, 48) action If(testing333, false = None)
    
#########################
#CAFE - EMPLOYEE MANAGE
#########################
#label apply_task_change:
#    python:
#        print "Assign " + selected_character + " at " + str(selected_action)
    
#    if selected_character == "astrid":
#        python:
#            astrid_stats.activity = selected_action
#    elif selected_character == "blanche":
#        python:
#            blanche_stats.activity = selected_action
#    elif selected_character == "kyra":
#        python:
#            kyra_stats.activity = selected_action
#    elif selected_character == "zeno":
#        python:
#            zeno_stats.activity = selected_action
#    elif selected_character == "ean":
#        python:
#            ean_stats.activity = selected_action
#    elif selected_character == "levi":
#        python:
#            levi_stats.activity = selected_action
#    python:
#        renpy.restart_interaction()
#    #call screen gui_cafe_employees2
#    #call screen assign_task

screen assign_task:
    
    python:
        print "1534"
    
    zorder 1
    
    $active_charm = 0
    $active_craft = 0
    $active_courage = 0
    $active_energy = 0
    $active_relationship = 0
    $active_salary = 0
    $active_salary_balance = 50
    
    $active_name = ""
    
    $active_currwork = 0
    
    if activeone == "astrid":
        $active_name = astrid_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/astrid_happy.png" xalign 1.1
        
        $active_charm = astrid_stats.charm
        $active_craft = astrid_stats.craft
        $active_courage = astrid_stats.courage
        $active_energy = MAX_ENERGY_VALUE - astrid_stats.stress
        $active_relationship = astrid_stats.friendship
        $active_salary_balance = astrid_stats.salary_balance
        #$active_salary = 
        
    elif activeone == "blanche":
        $active_name = blanche_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/blanche_happy.png" xalign 1.1
        
        $active_charm = blanche_stats.charm
        $active_craft = blanche_stats.craft
        $active_courage = blanche_stats.courage
        $active_energy = MAX_ENERGY_VALUE - blanche_stats.stress
        $active_relationship = blanche_stats.friendship
    elif activeone == "kyra":
        $active_name = kyra_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/kyra_happy.png" xalign 1.1
        
        $active_charm = kyra_stats.charm
        $active_craft = kyra_stats.craft
        $active_courage = kyra_stats.courage
        $active_energy = MAX_ENERGY_VALUE - kyra_stats.stress
        $active_relationship = kyra_stats.friendship
    elif activeone == "zeno":
        $active_name = zeno_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/zeno_happy.png" xalign 1.1
        
        $active_charm = zeno_stats.charm
        $active_craft = zeno_stats.craft
        $active_courage = zeno_stats.courage
        $active_energy = MAX_ENERGY_VALUE - zeno_stats.stress
        $active_relationship = zeno_stats.friendship
    elif activeone == "ean":
        $active_name = ean_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/ean_happy.png" xalign 1.1
        
        $active_charm = ean_stats.charm
        $active_craft = ean_stats.craft
        $active_courage = ean_stats.courage
        $active_energy = MAX_ENERGY_VALUE - ean_stats.stress
        $active_relationship = ean_stats.friendship
    elif activeone == "levi":
        $active_name = levi_stats.name
        text active_name style "font_charname" xalign 0.55 ypos 0.2
        add "images/characters/levi_happy.png" xalign 1.1
        
        $active_charm = levi_stats.charm
        $active_craft = levi_stats.craft
        $active_courage = levi_stats.courage
        $active_energy = MAX_ENERGY_VALUE - levi_stats.stress
        $active_relationship = levi_stats.friendship
    elif activeone == "mc":
        add "images/characters/astrid_happy.png" xalign 1.1 # TODO: Change to appropriate gender (or not print any at all). Or baka ibang screen nalang?
        
    if activeone != "":
        frame:
            xalign 0.6
            yalign 0.4
            
            hbox:
                vbox:
                    text "Charm" size 20
                    text "Craft" size 20
                    text "Courage" size 20
                    text "Energy" size 20
                    text "Friendship" size 20
                    text "Salary" size 20
                vbox:
                    text "" size 20
                    text "" size 20
                    text "" size 20
                    text "" size 20
                    text "" size 20
                    text "" size 20
                vbox:
                    bar value active_charm range MAX_ATTRIBUTE_VALUE xmaximum 150
                    bar value active_craft range MAX_ATTRIBUTE_VALUE xmaximum 150
                    bar value active_courage range MAX_ATTRIBUTE_VALUE xmaximum 150
                    bar value active_energy range MAX_ENERGY_VALUE xmaximum 150
                    bar value active_relationship range MAX_RELATIONSHIP_VALUE xmaximum 150
                    if activeone == "astrid":
                        #bar value astrid_stats.salary_balance range 100 changed astrid_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(astrid_stats, "salary_balance", 100) xmaximum 150
                    elif activeone == "blanche":
                        #bar value blanche_stats.salary_balance range 100 changed blanche_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(blanche_stats, "salary_balance", 100) xmaximum 150
                    elif activeone == "kyra":
                        #bar value kyra_stats.salary_balance range 100 changed kyra_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(kyra_stats, "salary_balance", 100) xmaximum 150
                    elif activeone == "zeno":
                        #bar value zeno_stats.salary_balance range 100 changed zeno_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(zeno_stats, "salary_balance", 100) xmaximum 150
                    elif activeone == "ean":
                        #bar value ean_stats.salary_balance range 100 changed ean_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(ean_stats, "salary_balance", 100) xmaximum 150
                    elif activeone == "levi":
                        #bar value levi_stats.salary_balance range 100 changed levi_stats.adjust_salary_balance xmaximum 150
                        bar value FieldValue(levi_stats, "salary_balance", 100) xmaximum 150
                        
                        
                vbox:
                    text ("%d" % (active_charm)) size 20
                    text ("%d" % (active_craft)) size 20
                    text ("%d" % (active_courage)) size 20
                    text ("%d" % (active_energy)) size 20
                    text ("%d" % (active_relationship)) size 20
                    if activeone == "astrid":
                        #text ("%d" % (astrid_stats.get_salary())) size 20
                        add DynamicDisplayable(astrid_stats.get_salary_text)
                    elif activeone == "blanche":
                        text ("%d" % (blanche_stats.get_salary())) size 20
                    elif activeone == "kyra":
                        text ("%d" % (kyra_stats.get_salary())) size 20
                    elif activeone == "zeno":
                        text ("%d" % (zeno_stats.get_salary())) size 20
                    elif activeone == "ean":
                        text ("%d" % (ean_stats.get_salary())) size 20
                    elif activeone == "levi":
                        text ("%d" % (levi_stats.get_salary())) size 20

    if activeone == "astrid":
        python:
            active_stats = astrid_stats
            selected_action = astrid_stats.activity
        
    elif activeone == "blanche":
        python:
            active_stats = blanche_stats

    elif activeone == "kyra":
        python:
            active_stats = kyra_stats

    elif activeone == "zeno":
        python:
            active_stats = zeno_stats

    elif activeone == "ean":
        python:
            active_stats = ean_stats

    elif activeone == "levi":
        python:
            active_stats = levi_stats
        
    $active_name = active_stats.name
    
    $test_image = "images/ui/cafe_buttons/options_hover.png"
    #$selected_action = active_stats.activity
    
    imagebutton:
        #insensitive im.Alpha("images/ui/employee_icons/blanche_idle.png", 90) # 100 = FADED OUT, #0 = CLEAR
        #insensitive test_image #TODO: Change to a locked icon
        idle "images/ui/cafe_buttons/serve_idle.png"
        hover "images/ui/cafe_buttons/reports_hover.png"
        selected_idle "images/ui/cafe_buttons/reports_hover.png"
        selected_hover "images/ui/cafe_buttons/reports_hover.png"
        action If(active_stats.activity != INACTIVE, true = [SetField(active_stats, "activity", SERVE)], false = None)
        xalign 0.43
        yalign 0.43
    imagebutton:
        #insensitive test_image #TODO: Change to a locked icon
        idle "images/ui/cafe_buttons/cook_idle.png"
        hover "images/ui/cafe_buttons/reports_hover.png"
        selected_idle "images/ui/cafe_buttons/reports_hover.png"
        selected_hover "images/ui/cafe_buttons/reports_hover.png"
        action If(active_stats.activity != INACTIVE, true = [SetField(active_stats, "activity", COOK)], false = None)
        xalign 0.6
        yalign 0.43
    imagebutton:
        #insensitive test_image #TODO: Change to a locked icon
        idle "images/ui/cafe_buttons/perform_idle.png"
        hover "images/ui/cafe_buttons/reports_hover.png"
        selected_idle "images/ui/cafe_buttons/reports_hover.png"
        selected_hover "images/ui/cafe_buttons/reports_hover.png"
        action If(active_stats.activity != INACTIVE, true = [SetField(active_stats, "activity", PERFORM)], false = None)
        xalign 0.77
        yalign 0.43
    imagebutton:
        #insensitive test_image #TODO: Change to a locked icon
        idle "images/ui/cafe_buttons/rest_idle.png"
        hover "images/ui/cafe_buttons/reports_hover.png"
        selected_idle "images/ui/cafe_buttons/reports_hover.png"
        selected_hover "images/ui/cafe_buttons/reports_hover.png"
        action If(active_stats.activity != INACTIVE, true = [SetField(active_stats, "activity", REST)], false = None)
        xalign 0.43
        yalign 0.6
    imagebutton:
        #insensitive test_image #TODO: Change to a locked icon
        idle "images/ui/cafe_buttons/hangout_idle.png"
        hover "images/ui/cafe_buttons/reports_hover.png"
        selected_idle "images/ui/cafe_buttons/reports_hover.png"
        selected_hover "images/ui/cafe_buttons/reports_hover.png"
        action If(active_stats.activity != INACTIVE, true = [SetField(active_stats, "activity", HANGOUT)], false = None)
        xalign 0.6
        yalign 0.6
    
    text active_name xalign 0.55 ypos 0.2
    
    #Jump("refresh_gui_cafe_employees")

screen gui_cafe_employees2:
    
    #tag menu
    
    #modal False
        
    #QQQQ
    $ is_shinjuku_unlocked = False
    
    
    #1) Do the imagemap
    #TODO: Put if statements, do not activate hotspot of characters not yet unlocked
    imagemap:   
        ground "images/ui/eassign_ground.png"
        idle "images/ui/eassign_idle.png"
        hover "images/ui/eassign_hover.png"
        insensitive "images/ui/eassign_ground.png"
        selected_idle "images/ui/eassign_ground.png" #TODO: Change to a real selected_idle state!
        #selected_hover "images/dummy/prefs_selected_hover.png"
        alpha False
        #insensitive "images/dummy/prefs_ground.png"
        
        hotspot (354, 482, 59, 60) action [SetVariable("activeone", "astrid"), SetVariable("selected_character", "astrid"), Show('assign_task')]
        hotspot (418, 482, 59, 60) action [SetVariable("activeone", "blanche"), SetVariable("selected_character", "blanche"), Show('assign_task')]
        hotspot (480, 482, 57, 57) action If(kyra_stats.unlocked == True, false = void()) #TODO: Do for every other employee
        hotspot (545, 482, 57, 57) action [SetVariable("activeone", "zeno"), SetVariable("selected_character", "zeno"), Show('assign_task')]
        hotspot (606, 482, 57, 57) action [SetVariable("activeone", "ean"), SetVariable("selected_character", "ean"), Show('assign_task')]
        hotspot (672, 482, 57, 57) action [SetVariable("activeone", "levi"), SetVariable("selected_character", "levi"), Show('assign_task')]
        #hotspot (735, 482, 57, 57) action [SetVariable("selected_character", "astrid"), ShowTransient('assign_task')]
        
        hotspot (21, 507, 83, 87) action Return()
        #hotspot (728, 8, 60, 48) action If(testing333, false = None)
    
#    #2) Do the mouse areas
#    #TODO: Put if statements, do not activate mousearea of characters not yet unlocked
    
#    mousearea: 
#        area (354, 482, 59, 60) 
#        #hovered [SetVariable("activeone", "astrid"), Show('gui_emp_stats', transition=vfdissolve)]
#        #unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    mousearea: 
#        area (418, 482, 59, 60) 
#        hovered [SetVariable("activeone", "blanche"), Show('gui_emp_stats', transition=vfdissolve)]
#        unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    if kyra_stats.unlocked == True: #TODO: do for every other employee
#        mousearea: 
#            area (480, 482, 57, 57) 
#            hovered [SetVariable("activeone", "kyra"), Show('gui_emp_stats', transition=vfdissolve)]
#            unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    mousearea: 
#        area (545, 482, 57, 57) 
#        hovered [SetVariable("activeone", "zeno"), Show('gui_emp_stats', transition=vfdissolve)]
#        unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    mousearea: 
#        area (606, 482, 57, 57) 
#        hovered [SetVariable("activeone", "ean"), Show('gui_emp_stats', transition=vfdissolve)]
#        unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    mousearea: 
#        area (672, 482, 57, 57) 
#        hovered [SetVariable("activeone", "levi"), Show('gui_emp_stats', transition=vfdissolve)]
#        unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
#    mousearea: 
#        area (735, 482, 57, 57) 
#        hovered [SetVariable("activeone", "mc"), Show('gui_emp_stats', transition=vfdissolve)]
#        unhovered [SetVariable("activeone", ""), Hide('gui_emp_stats', transition=vfdissolve)]
    
    #3) Add the current action icon.
    #add astrid_action_pic xpos 354 ypos 482
    if astrid_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 354 ypos 482
    elif astrid_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 354 ypos 482
    elif astrid_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 354 ypos 482
    elif astrid_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 354 ypos 482
    elif astrid_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 354 ypos 482
    
    if blanche_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 418 ypos 482
    elif blanche_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 418 ypos 482
    elif blanche_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 418 ypos 482
    elif blanche_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 418 ypos 482
    elif blanche_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 418 ypos 482
    
    if kyra_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 480 ypos 482
    elif kyra_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 480 ypos 482
    elif kyra_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 480 ypos 482
    elif kyra_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 480 ypos 482
    elif kyra_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 480 ypos 482
        
    if zeno_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 545 ypos 482
    elif zeno_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 545 ypos 482
    elif zeno_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 545 ypos 482
    elif zeno_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 545 ypos 482
    elif zeno_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 545 ypos 482
    
    if ean_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 606 ypos 482
    elif ean_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 606 ypos 482
    elif ean_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 606 ypos 482
    elif ean_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 606 ypos 482
    elif ean_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 606 ypos 482
    
    if levi_stats.activity == COOK:
        add "images/ui/cafe_icons/mini_cook.png" xpos 672 ypos 482
    elif levi_stats.activity == SERVE:
        add "images/ui/cafe_icons/mini_serve.png" xpos 672 ypos 482
    elif levi_stats.activity == REST:
        add "images/ui/cafe_icons/mini_rest.png" xpos 672 ypos 482
    elif levi_stats.activity == PERFORM:
        add "images/ui/cafe_icons/mini_perform.png" xpos 672 ypos 482
    elif levi_stats.activity == HANGOUT:
        add "images/ui/cafe_icons/mini_hangout.png" xpos 672 ypos 482

# CAFE - EMPLOYEE MANAGE (CHAR SCREEN)
#######################################

label aff_screen_label:
    e "You're in here"
    #call screen aff_screen
    return

#######################
# CAFE - RECIPE SCREEN
#######################

label process_upgrade:
    
    $ final_index = (recipe_page-1)*4 + recipe_index
    
    
    if active_recipe_tab == DRINK:
        python:
            recipe_drinks[final_index].level_up()
            cafe.spend_money(recipe_drinks[final_index].upgrade_price)
    elif active_recipe_tab == DESSERT:
        python:
            recipe_desserts[final_index].level_up()
            cafe.spend_money(recipe_desserts[final_index].upgrade_price)
    elif active_recipe_tab == MEAL:
        python:
            recipe_meals[final_index].level_up()
            cafe.spend_money(recipe_meals[final_index].upgrade_price)
    
    python:
        print "Left money: " + str(cafe.money)
    
    call screen gui_cafe_recipebook
    
screen gui_cafe_recipebook:
    python:
        print "Show the COOKBOOK"
    
    imagemap:   
        ground "images/ui/cafemenu_ground.png"
        idle "images/ui/cafemenu_idle.png"
        hover "images/ui/cafemenu_hover.png"
        #insensitive "images/ui/eassign_ground.png"
        selected_idle "images/ui/cafemenu_hover.png"
        #selected_hover "images/dummy/prefs_selected_hover.png"
        #alpha False
        
        hotspot (2, 12, 156, 61) action [SetVariable("active_recipe_tab", DRINK), resetRecipePage()]
        hotspot (158, 12, 127, 52) action [SetVariable("active_recipe_tab", DESSERT), resetRecipePage()]
        hotspot (285, 12, 120, 55) action [SetVariable("active_recipe_tab", MEAL), resetRecipePage()]
        hotspot (2, 309, 41, 45) action If(recipe_page > 1, true = decrementRecipePage(), false = void())
        hotspot (756, 309, 39, 47) action If(recipe_page < RECIPE_TOTALPAGES, true = incrementRecipePage(), false = void())
        hotspot (603, 5, 183, 53) action Jump("back_to_cafe_main")
        
        #show money
        text ("%d" % (cafe.money)) xpos 700 ypos 550  text_align 0.9 size 26
        
    if active_recipe_tab == DRINK:
        $ menu_list = recipe_drinks
    elif active_recipe_tab == DESSERT:
        $ menu_list = recipe_desserts
    elif active_recipe_tab == MEAL:
        $ menu_list = recipe_meals
    
    $start_idx = (recipe_page-1) * 4
    $idx = (recipe_page-1) * 4

    
    #UPPER LEFT
    add "images/ui/recipebook/food_panel.png" xalign 0.1 yalign 0.25
    add menu_list[idx].img_url xpos 60 ypos 170
    text ("%s" % (menu_list[idx].name)) xpos 60 ypos 120  text_align 0.0 size 22
    text ("%d" % (menu_list[idx].sell_price[menu_list[idx].level-1])) xpos 330 ypos 120 text_align 1.0 size 26
    text ("Total Sales: %d" % (menu_list[idx].sales)) xpos 180 ypos 200 text_align 0.0 size 18
    if (menu_list[idx].level) < 4: #show next level price
        text ("Next Level: %d" % (menu_list[idx].sell_price[menu_list[idx].level])) xpos 180 ypos 220 text_align 0.0 size 18
        text ("Upgrade!\n%d" %(menu_list[idx].upgrade_price)) xpos 320 ypos 250 size 18 text_align 0.5
        textbutton ("Upgrade! %d" %(menu_list[idx].upgrade_price)) :
            xpos 180 
            ypos 250 
            action If( cafe.money >= menu_list[idx].upgrade_price, true = [SetVariable("recipe_index", 0), Jump("process_upgrade")], false = void())
    
    $ idx += 1
    
    # UPPER RIGHT
    add "images/ui/recipebook/food_panel.png" xalign 0.9 yalign 0.25
    add menu_list[idx].img_url xpos 430 ypos 170
    text ("%s" % (menu_list[idx].name)) xpos 430 ypos 120  text_align 0.0 size 22
    text ("%d" % (menu_list[idx].sell_price[menu_list[idx].level-1])) xpos 700 ypos 120 text_align 1.0 size 26
    text ("Total Sales: %d" % (menu_list[idx].sales)) xpos 550 ypos 200 text_align 0.0 size 18
    if (menu_list[idx].level) < 4: #show next level price
        text ("Next Level: %d" % (menu_list[idx].sell_price[menu_list[idx].level])) xpos 550 ypos 220 text_align 0.0 size 18
        text ("Upgrade!\n%d" %(menu_list[idx].upgrade_price)) xpos 690 ypos 250 size 18 text_align 0.5
        textbutton ("Upgrade! %d" %(menu_list[idx].upgrade_price)) :
            xpos 550 
            ypos 250 
            action If( cafe.money >= menu_list[idx].upgrade_price, true = [SetVariable("recipe_index", 1), Jump("process_upgrade")], false = void())
    
    $ idx += 1
    
    #LOWER LEFT
    add "images/ui/recipebook/food_panel.png" xalign 0.1 yalign 0.85
    add menu_list[idx].img_url xpos 60 ypos 410
    text ("%s" % (menu_list[idx].name)) xpos 60 ypos 360  text_align 0.0 size 22
    text ("%d" % (menu_list[idx].sell_price[menu_list[idx].level-1])) xpos 330 ypos 360 text_align 1.0 size 26
    text ("Total Sales: %d" % (menu_list[idx].sales)) xpos 180 ypos 440 text_align 0.0 size 18
    if (menu_list[idx].level) < 4: #show next level price
        text ("Next Level: %d" % (menu_list[idx].sell_price[menu_list[idx].level])) xpos 180 ypos 460 text_align 0.0 size 18
        text ("Upgrade!\n%d" %(menu_list[idx].upgrade_price)) xpos 320 ypos 490 size 18 text_align 0.5
        textbutton ("Upgrade! %d" %(menu_list[idx].upgrade_price)) :
            xpos 180 
            ypos 490 
            action If( cafe.money >= menu_list[idx].upgrade_price, true = [SetVariable("recipe_index", 2), Jump("process_upgrade")], false = void())
    
    $ idx += 1
    
    #LOWER RIGHT
    add "images/ui/recipebook/food_panel.png" xalign 0.9 yalign 0.85
    add menu_list[idx].img_url xpos 430 ypos 410
    text ("%s" % (menu_list[idx].name)) xpos 430 ypos 360  text_align 0.0 size 22
    text ("%d" % (menu_list[idx].sell_price[menu_list[idx].level-1])) xpos 700 ypos 360 text_align 1.0 size 26
    text ("Total Sales: %d" % (menu_list[idx].sales)) xpos 550 ypos 440 text_align 0.0 size 18
    if (menu_list[idx].level) < 4: #show next level price
        text ("Next Level: %d" % (menu_list[idx].sell_price[menu_list[idx].level])) xpos 550 ypos 460 text_align 0.0 size 18
        text ("Upgrade!\n%d" %(menu_list[idx].upgrade_price)) xpos 690 ypos 490 size 18 text_align 0.5
        textbutton ("Upgrade! %d" %(menu_list[idx].upgrade_price)) :
            xpos 550 
            ypos 490 
            action If( cafe.money >= menu_list[idx].upgrade_price, true = [SetVariable("recipe_index", 3), Jump("process_upgrade")], false = void())
    
        
        #hotspot (728, 8, 60, 48) action If(testing333, false = None)


################################
#CAFE - ANIMATIONS & DAY RESULTS
################################

screen show_results:
    
    text ("Sales: %d" % (menu_list[idx].name)) xalign 1.0 yalign 0.0
    text ("Tips: %d" % (menu_list[idx].name)) xalign 1.0 yalign 0.1
    text ("Breakages: %d" % (menu_list[idx].name)) xalign 1.0 yalign 0.2
    text ("Salary: %d" % (menu_list[idx].name)) xalign 1.0 yalign 0.3
    text ("Tax: %d" % (menu_list[idx].name)) xalign 1.0 yalign 0.4
    
    text ("Profit: " % (menu_list[idx].name)) xalign 1.0 yalign 0.7



# FOR SAVING FILES
screen file_slot_test:
    button:
        action FileAction(slot)

        has hbox

        add FileScreenshot(slot)
        vbox:
            text FileTime(slot, empty="Empty Slot.")
            text FileSaveName(slot)


screen save_test:
    grid 2 5:
        for i in range(1, 11):
            use file_slot_test(slot=i)

# JuST IMAGES. 
screen add_test:
    add "images/dummy/colorblind.png" xalign 1.0 yalign 0.0
    add "images/dummy/hover.png" xalign 0.5 yalign 0.5
    
    
#BUTTONS. DO THIS FOR THE CAFE GUI! 
#screen gui_cafe_main:
#     vbox xalign 0.3 yalign 0.3:
#         do this for menu!
#          use action Jump('label_name_here') for jumping to a label
#     imagebutton auto "images/ui/cafe_buttons/manage_employees_%s.png" action ShowMenu('save') xalign 0.1 yalign 0.25
#     imagebutton auto "images/ui/cafe_buttons/reports_%s.png" action Jump('prologue') xalign 0.25 yalign 0.25
#     imagebutton auto "images/ui/cafe_buttons/shop_%s.png" action ShowMenu('save') xalign 0.1 yalign 0.5
#     imagebutton auto "images/ui/cafe_buttons/options_%s.png" action ShowMenu('preferences') xalign 0.25 yalign 0.5
#          imagebutton auto "save_%s.png" action ShowMenu('save')
#          imagebutton auto "prefs_%s.png" action ShowMenu('preferences')
#          imagebutton auto "skip_%s.png" action Skip()
#          imagebutton auto "afm_%s.png" action Preference("auto-forward mode", "toggle")
    
screen volume_controls:
    frame:
        has vbox

        bar value Preference("sound volume")
        bar value Preference("music volume")
        bar value Preference("voice volume")

screen hud_day:
    frame:
        xpadding 10
        ypadding 10
        xalign 1.0
        yalign 0.0

        vbox:
            text "Y[calendar.current_year], [calendar.current_month]/[calendar.current_date]"
            null height 20
            #textbutton "Fullscreen" action Preference("display", "fullscreen")
            #textbutton "Window" action Preference("display", "window")
        
screen example_imagemap:
    imagemap:
        ground "images/dummy/imagemap_ground.jpg"
        hover "images/dummy/imagemap_hover.jpg"

        hotspot (8, 200, 78, 78) clicked Return("swim")
        hotspot (204, 50, 78, 78) clicked Return("science")
        hotspot (452, 79, 78, 78) clicked Return("art")
        hotspot (602, 316, 78, 78) clicked Return("go home")

##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say
screen say:

    # Defaults for side_image and two_window
    default side_image = None
    default two_window = False

    # Decide if we want to use the one-window or two-window varaint.
    if not two_window:

        # The one window variant.        
        window:
            id "window"

            has vbox:
                style "say_vbox"

            if who:
                text who:
                    id "who"
                    #QQQQ
                    xmaximum 333
                    yoffset 65
                    xoffset 90

            text what:
                id "what"
                #QQQQ
                xmaximum 868
                yoffset 22
                xoffset 90

    else:

        # The two window variant.
        vbox:
            style "say_two_window_vbox"

            if who:
                
                #QQQQ
                window:
                    id "window"
                    yoffset 47
                    
                    has vbox:
                        style "say_vbox"
                        
                    text what:
                        id "what"
                        xmaximum 868
                        yoffset 42
                        xoffset 82
                #####
                window:
                    #QQQQ
                    yoffset -118
                    xoffset 120
                    
                    ####
                    style "say_who_window"

                    text who:
                        id "who"
            #QQQQ : Added else here
            else:
                
                window:
                    id "window"
                    #QQQQ
                    yoffset 35

                    has vbox:
                        style "say_vbox"

                    text what:
                        id "what"
                        #QQQQ
                        xmaximum 870
                        yoffset 42
                        xoffset 82
                        
              
    # If there's a side image, display it above the text.
    if side_image:
        add side_image
    else:
        add SideImage() xalign 0.0 yalign 1.0

    # Use the quick menu.
    #if show_quick_menu: #QQQ
    use quick_menu
    
#QQQQ FULLY COPIED
init -5 python:
    style.say_label.font = "Cheboyga.ttf"
    style.say_label.bold = False #unbolds it
    style.say_label.kerning = 5                        #SPACING FROM EACH CHARACTER
    style.say_label.color = "#ffe69b"
    style.say_label.outlines = [(1, "#765b47", 0, 0)]  # 1 - thickness, 2 - hex color, 3 - xshadow, 4 - yshadow
    style.say_label.drop_shadow = [(2, 1)]             # 1 - xshadow, 2 - yshadow
    style.say_label.size = 35                          # font size
    style.say_who_window.background = None
    style.say_window.top_padding = 0
    #style.say_window.left_padding = 79
    style.say_window.right_padding = 0
    style.say_dialogue.color = "#111511"
    style.say_dialogue.line_spacing = 0
    style.say_dialogue.antialias = True                # make shadow smoother
    style.say_dialogue.outlines = [(2, "#f1c66f", 0, 0)]
    #style.say_dialogue.kerning = -0.5
    style.say_thought.color = "#111511"
    style.say_thought.line_spacing = 0
    style.say_thought.antialias = True
    style.say_thought.outlines = [(2, "#f1c66f", 0, 0)]
    #style.say_thought.kerning = -0.5


##############################################################################
# Choice
#
# Screen that's used to display in-game menus.
# http://www.renpy.org/doc/html/screen_special.html#choice

screen choice:

    window: 
        style "menu_window"        
        xalign 0.5
        yalign 0.5
        
        vbox:
            style "menu"
            spacing 2
            
            for caption, action, chosen in items:
                
                if action:  
                    
                    button:
                        action action
                        style "menu_choice_button"                        

                        text caption style "menu_choice"
                    
                else:
                    text caption style "menu_caption"

init -2 python:
    config.narrator_menu = True
    
    style.menu_window.set_parent(style.default)
    style.menu_choice.set_parent(style.button_text)
    style.menu_choice.clear()
    style.menu_choice_button.set_parent(style.button)
    style.menu_choice_button.xminimum = int(config.screen_width * 0.75)
    style.menu_choice_button.xmaximum = int(config.screen_width * 0.75)
    
    style.menu_choice_button.xminimum = 830
    #style.menu_choice_button.xminimum = int(config.screen_width * 0.75) #Either works
    style.menu_choice_button.xmaximum = 830
    
    style.menu_choice.color = "#6b452b"
    style.menu_choice.size = 22
    style.menu_choice.yoffset = 1
    style.menu_choice.hover_color = "#46140f"
    style.menu_choice.hover_drop_shadow = None
    style.menu_choice_button.background = "#ffffff"
    style.menu_choice_button.hover_background = "#000000"
    
    #TODO: PUT THE MENU IMAGES HERE!
    #style.menu_choice_button.background = "ui/choice.png"
    #style.menu_choice_button.hover_background = "ui/choice_h.png"
    style.menu_choice_button.ymaximum = 75
    style.menu_choice_button.yminimum = 75 
    
    ##############GARBAGE
    #style.menu_choice_button.yminimum = int(config.screen_width * 0.060)
    #style.menu_choice_button.ymaximum = int(config.screen_width * 0.060)
    #style.menu_choice_button.background = Frame("GUI/button_idle.png",28,9)
    #style.menu_choice_button.hover_background = Frame("GUI/button_hover.png",28,9)
    #style.menu.color = "#000000"
    #style.menu.hover_color = "#000000"
    #style.menu_window.set_parent(style.default)
    #style.menu_choice.set_parent(style.button_text)
    #style.menu_choice.clear()
    #style.menu_choice_button.set_parent(style.button)


##############################################################################
# Input
#
# Screen that's used to display renpy.input()
# http://www.renpy.org/doc/html/screen_special.html#input

screen input:

    window:
        #QQQQ
        xalign 0.5
        yalign 0.5
        ####
        has vbox

        text prompt:
            #QQQQ
            yoffset 36
            style "say_dialogue"
            xoffset 82
            ####
            
        input:
            id "input"
            #QQQQ
            style "say_dialogue"
            color "#8e6439"
            yoffset 36
            xoffset 107
            ####

    use quick_menu
        
##############################################################################
# Nvl
#
# Screen used for nvl-mode dialogue and menus.
# http://www.renpy.org/doc/html/screen_special.html#nvl

screen nvl:

    window:
        style "nvl_window"

        has vbox:
            style "nvl_vbox"

        # Display dialogue.
        for who, what, who_id, what_id, window_id in dialogue:
            window:
                id window_id

                has hbox:
                    spacing 10

                if who is not None:
                    text who id who_id

                text what id what_id

        # Display a menu, if given.
        if items:

            vbox:
                id "menu"

                for caption, action, chosen in items:

                    if action:

                        button:
                            style "nvl_menu_choice_button"
                            action action

                            text caption style "nvl_menu_choice"

                    else:

                        text caption style "nvl_dialogue"

    add SideImage() xalign 0.0 yalign 1.0
    
    use quick_menu
        
##############################################################################
# Main Menu 
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu

### OLD MAIN MENU
#screen main_menu:

#    # This ensures that any other menu screen is replaced.
#    tag menu

#    # The background of the main menu.
#    window:
#        style "mm_root"

#    # The main menu buttons.
#    frame:
#        style_group "mm"
#        #xalign .98
#        #yalign .98
#        xalign .5
#        yalign 1.0

#        has hbox

#        textbutton _("Start Game") action Start()
#        #imagebutton auto 
#        textbutton _("Load Game") action ShowMenu("load")
#        textbutton _("Preferences") action ShowMenu("preferences")
#        textbutton _("Help") action Help()
#        textbutton _("Quit") action Quit(confirm=False)

screen main_menu:
    
    #QQQQ
    key "l" action ShowMenu("load")
    key "p" action ShowMenu("preferences")
    # This ensures that any other menu screen is replaced.
    tag menu

    imagemap:
        ground "images/dummy/mm_ground.png"
        idle "images/dummy/mm_idle.png"
        hover "images/dummy/mm_hover.png"
        
        hotspot (38, 188, 223, 60) action [ Start() ]
        hotspot (37, 267, 230, 55) action [ ShowMenu("load") ]
        hotspot (39, 345, 230, 53) action [ ShowMenu("preferences")]
        hotspot (37, 420, 232, 55) action Quit(confirm=False)
        if persistent.beaten:
            hotspot (466, 269, 237, 61) action [ Start("real")]
            hotspot (463, 371, 233, 71) action [ ShowMenu("bonus") ]

        
#        #if not persistent.beaten:
#        #    hotspot (38, 188, 223, 60) action [ Start(), Hide("mm_prologue", transition=sdissolve) ]
#        #else:
#        hotspot (38, 188, 223, 60) action [ Start("real"), Hide("mm_post", transition=sdissolve) ]
#        hotspot (37, 267, 230, 55) action [ ShowMenu("load"), Hide("mm_load", transition=sdissolve) ]
#        hotspot (39, 345, 230, 53) action [ ShowMenu("preferences"), Hide("mm_prefs", transition=sdissolve) ]
#        hotspot (37, 420, 232, 55) action Quit(confirm=False)
#        hotspot (33, 494, 239, 64) action [ Start("help_label"), Hide("mm_help", transition=sdissolve) ]
#        if persistent.beaten:
#            hotspot (466, 269, 237, 61) action [ Start(), Hide("mm_prologue", transition=sdissolve) ]
#            hotspot (463, 371, 233, 71) action [ ShowMenu("bonus"), Hide("mm_bonus", transition=sdissolve) ]
            
    # FUCKING SHIT
#    if not persistent.beaten:
#        mousearea:
#            area (0, 40, 378, 85)
#            hovered Show("mm_prologue", transition=sdissolve)
#            unhovered Hide("mm_prologue", transition=sdissolve)
#    else:
#        mousearea:
#            area (0, 40, 378, 85)
#            hovered Show("mm_post", transition=sdissolve)
#            unhovered Hide("mm_post", transition=sdissolve)
            
    
#    mousearea:
#        area (0, 136, 360, 89)
#        hovered Show("mm_load", transition=sdissolve)
#        unhovered Hide("mm_load", transition=sdissolve)
#    mousearea:
#        area (0, 235, 341, 85)
#        hovered Show("mm_prefs", transition=sdissolve)
#        unhovered Hide("mm_prefs", transition=sdissolve)
#    mousearea:
#        area (0, 325, 320, 93)
#        hovered Show("mm_quit", transition=sdissolve)
#        unhovered Hide("mm_quit", transition=sdissolve)
#    mousearea:
#        area (0, 423, 295, 86)
#        hovered Show("mm_help", transition=sdissolve)
#        unhovered Hide("mm_help", transition=sdissolve)
    
#    if persistent.beaten:
#        mousearea:
#            area (816, 16, 207, 67)
#            hovered Show("mm_prologue", transition=sdissolve)
#            unhovered Hide("mm_prologue", transition=sdissolve)
#        mousearea:
#            area (790, 88, 233, 61)
#            hovered Show("mm_bonus", transition=sdissolve)
#            unhovered Hide("mm_bonus", transition=sdissolve)    
init -2 python:

    # Make all the main menu buttons be the same size. (WAS ALSO PART OF OLD. REUSED)
    style.mm_button.size_group = "mm"
    
#screen mm_bonus:
#    #add "images/dummy/"
#    add "mouseovers/mm_bonus.png"
    
#screen mm_help:
#    add "mouseovers/mm_help.png"
    
#screen mm_prologue:
#    add "mouseovers/mm_prologue.png"
    
#screen mm_post:
#    add "mouseovers/mm_post.png"
    
#screen mm_prefs:
#    add "mouseovers/mm_preferences.png"

#screen mm_quit:
#    add "mouseovers/mm_quit.png"
    
#screen mm_load:
#    add "mouseovers/mm_load.png"


##############################################################################
# Navigation (WTF IS THIS?)
#
# Screen that's included in other screens to display the game menu
# navigation and background.
# http://www.renpy.org/doc/html/screen_special.html#navigation
screen navigation:

    # The background of the game menu.
    window:
        style "gm_root"

    # The various buttons.
    # NEW SHIT
    frame:
        style_group "gm_nav"
        #xalign .98
        #yalign .98
        xalign .5
        yalign .93
        
        #has vbox
        has hbox

        textbutton _("Return") action Return()
        textbutton _("Preferences") action ShowMenu("preferences")
        textbutton _("Save Game") action ShowMenu("save")
    frame:
        style_group "gm_nav"
        xalign 0.5
        yalign 1.0
        
        has hbox

        textbutton _("Load Game") action ShowMenu("load")
        textbutton _("Main Menu") action MainMenu()
        textbutton _("Help") action Help()
        textbutton _("Quit") action Quit()
        
        #textbutton _("Load Game") action ShowMenu("load")
        #textbutton _("Main Menu") action MainMenu()
        #textbutton _("Help") action Help()
        #textbutton _("Quit") action Quit()

init -2 python:
    style.gm_nav_button.size_group = "gm_nav"
    

##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load

# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.

#QQQQ
screen load_save_slot:
    
    #TODO: Adjust the values here to properly align the text and screenshots!!!!!
    
    $ file_text = "{size=+4}{i}%s{/i}{/size}\n%s: %s" % (
                        FileSaveName(number),
                        FileSlotName(number, 4),
                        FileTime(number, format='%B %d, %Y \n    (%I:%M%p)', empty=_("Empty Slot."))
                        )

    add FileScreenshot(number) xpos 61 ypos 69 
    text file_text xpos 215 ypos 78 size 18 color "#261d0c"

screen file_picker:

    #QQQQ
    key "m" action MainMenu(confirm=True)
    key "p" action ShowMenu("preferences")
    key "K_ESCAPE" action Return()
    
    imagemap:
        ground "images/dummy/sl_ground.png"
        idle "images/dummy/sl_idle.png"
        hover "images/dummy/sl_hover.png"
        selected_idle "images/dummy/sl_selected_idle.png"

#        hotspot (528, 39, 14, 23) clicked FilePage(1)
#        hotspot (566, 40, 22, 23) clicked FilePage(2)
#        hotspot (611, 39, 18, 23) clicked FilePage(3)
#        hotspot (653, 40, 18, 21) clicked FilePage(4)
#        hotspot (694, 40, 17, 22) clicked FilePage(5)
#        hotspot (735, 41, 21, 20) clicked FilePage(6)
#        hotspot (776, 39, 22, 23) clicked FilePage(7)
#        hotspot (819, 39, 20, 23) clicked FilePage(8)
#        hotspot (860, 39, 23, 24) clicked FilePage(9)
#        hotspot (900, 39, 27, 23) clicked FilePage(10)

        hotspot (39, 114, 306, 224) clicked FileAction(1):
            use load_save_slot(number=1)
        hotspot (396, 115, 306, 224) clicked FileAction(2):
            use load_save_slot(number=2)
        hotspot (39, 360, 306, 224) clicked FileAction(3):
            use load_save_slot(number=3)
        hotspot (396, 360, 306, 224) clicked FileAction(4):
            use load_save_slot(number=4)
            
#        hotspot (523, 68, 62, 31) action ShowMenu("load")
#        hotspot (589, 70, 59, 29) action ShowMenu("save")
#        hotspot (653, 70, 60, 31) action Help()
#        hotspot (787, 72, 62, 27) action Quit()
#        hotspot (718, 71, 65, 27) action MainMenu()
        hotspot (695, 13, 77, 51) action Return()
    
    #OLD
#    frame:
#        style "file_picker_frame"

#        has vbox

#        # The buttons at the top allow the user to pick a
#        # page of files.
#        hbox:
#            style_group "file_picker_nav"
            
#            textbutton _("Previous"):
#                action FilePagePrevious()

#            textbutton _("Auto"):
#                action FilePage("auto")

#            textbutton _("Quick"):
#                action FilePage("quick")

#            for i in range(1, 9):
#                textbutton str(i):
#                    action FilePage(i)
                    
#            textbutton _("Next"):
#                action FilePageNext()

#        $ columns = 2
#        $ rows = 5
                
#        # Display a grid of file slots.
#        grid columns rows:
#            transpose True
#            xfill True
#            style_group "file_picker"
            
#            # Display ten file slots, numbered 1 - 10.
#            for i in range(1, columns * rows + 1):

#                # Each file slot is a button.
#                button:
#                    action FileAction(i)
#                    xfill True

#                    has hbox

#                    # Add the screenshot.
#                    add FileScreenshot(i)
                    
#                    # Format the description, and add it as text.
#                    $ description = "% 2s. %s\n%s" % (
#                        FileSlotName(i, columns * rows),
#                        FileTime(i, empty=_("Empty Slot.")),
#                        FileSaveName(i))

#                    text description

#                    key "save_delete" action FileDelete(i)
                    
                    
screen save:
    
    #QQQQ
    key "s" action Return()
    
    # This ensures that any other menu screen is replaced.
    tag menu

    #OLD
    #use navigation
    #use file_picker
    
    #QQQQ
    use file_picker
    add "images/dummy/sl_save.png" #makes the save text appear at the top

screen load:
    
    #QQQQ
    key "l" action Return()
    
    # This ensures that any other menu screen is replaced.
    tag menu

    #OLD
    #use navigation
    #use file_picker
    
    #QQQQ
    use file_picker
    add "images/dummy/sl_load.png" # makes the load text appear at the top

init -2 python:
    
    style.file_picker_frame = Style(style.menu_frame)

    style.file_picker_nav_button = Style(style.small_button)
    style.file_picker_nav_button_text = Style(style.small_button_text)

    style.file_picker_button = Style(style.large_button)
    style.file_picker_text = Style(style.large_button_text)
    
    #QQQQ NEW
    config.thumbnail_width = 75
    config.thumbnail_height = 42
    #config.skip_indicator = "ui/pixel.png"

    

##############################################################################
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_special.html#prefereces

screen preferences:

    #$testing333 = False
    
    #QQQQ
    
    #KAILANGAN ITO KUNG WALA, DI SIYA MAGRERETURN!
    tag menu
    ####

#    key "s" action ShowMenu("save")
#    key "l" action ShowMenu("load")
#    key "m" action MainMenu(confirm=True)
#    key "p" action Return()
    key "K_ESCAPE" action Return()
    
    imagemap:   
        ground "images/dummy/prefs_ground.png"
        idle "images/dummy/prefs_idle.png"
        hover "images/dummy/prefs_hover.png"
        selected_idle "images/dummy/prefs_selected_idle.png"
        selected_hover "images/dummy/prefs_selected_hover.png"
        alpha False
        #insensitive "images/dummy/prefs_ground.png"
        
        hotspot (51, 53, 187, 43) action Preference("display", "fullscreen")
        hotspot (51, 105, 187, 43) action Preference("display", "window")
        hotspot (54, 167, 187, 43) action Preference("skip", "seen")
        hotspot (54, 222, 187, 43) action Preference("skip", "all")
        hotspot (54, 291, 187, 43) action Preference("transitions", "all")
        hotspot (54, 344, 187, 43) action Preference("transitions", "none")
        hotspot (51, 425, 187, 43) action Preference("after choices", "stop")
        hotspot (51, 478, 187, 43) action Preference("after choices", "skip")
        hotspot (728, 8, 60, 48) action Return()
        #hotspot (728, 8, 60, 48) action If(testing333, false = None)
        bar pos (675, 129) value Preference("text speed") style "pref_slider"
        bar pos (636, 510) value Preference("sound volume") style "pref_slider"
        bar pos (627, 385) value Preference("music volume") style "pref_slider"
        bar pos (634, 257) value Preference("auto-forward time") style "pref_slider"
        

# JUST FOR PUTTING A MENU BACKWARDS. I ONLY NEED RETURN FOR NOW
#    imagemap:
#        ground "ui/prefs_menu_ground.png"
#        idle "ui/prefs_menu_idle.png"
#        hover "ui/prefs_menu_hover.png"
        
#        hotspot (949, 279, 61, 30) action ShowMenu("load")
#        hotspot (946, 315, 66, 31) action ShowMenu("save")
#        hotspot (947, 354, 65, 31) action Help()
#        hotspot (948, 427, 64, 31) action Quit()
#        hotspot (947, 392, 64, 27) action MainMenu()
#        hotspot (944, 500, 68, 31) action Return()
        
    #OLD!
#    tag menu

#    # Include the navigation.
#    use navigation

#    # Put the navigation columns in a three-wide grid.
#    grid 3 1:
#        style_group "prefs"
#        xfill True

#        # The left column.
#        vbox:
#            frame:
#                style_group "pref"
#                has vbox

#                label _("Display")
#                textbutton _("Window") action Preference("display", "window")
#                textbutton _("Fullscreen") action Preference("display", "fullscreen")

#            frame:
#                style_group "pref"
#                has vbox

#                label _("Transitions")
#                textbutton _("All") action Preference("transitions", "all")
#                textbutton _("None") action Preference("transitions", "none")

#            frame:
#                style_group "pref"
#                has vbox

#                label _("Text Speed")
#                bar value Preference("text speed")

#            frame:
#                style_group "pref"
#                has vbox

#                textbutton _("Joystick...") action Preference("joystick")

#        vbox:
#            frame:
#                style_group "pref"
#                has vbox

#                label _("Skip")
#                textbutton _("Seen Messages") action Preference("skip", "seen")
#                textbutton _("All Messages") action Preference("skip", "all")

#            frame:
#                style_group "pref"
#                has vbox

#                textbutton _("Begin Skipping") action Skip()

#            frame:
#                style_group "pref"
#                has vbox

#                label _("After Choices")
#                textbutton _("Stop Skipping") action Preference("after choices", "stop")
#                textbutton _("Keep Skipping") action Preference("after choices", "skip")

#            frame:
#                style_group "pref"
#                has vbox

#                label _("Auto-Forward Time")
#                bar value Preference("auto-forward time")

#        vbox:
#            frame:
#                style_group "pref"
#                has vbox

#                label _("Music Volume")
#                bar value Preference("music volume")

#            frame:
#                style_group "pref"
#                has vbox

#                label _("Sound Volume")
#                bar value Preference("sound volume")

#                if config.sample_sound:
#                    textbutton "Test":
#                        action Play("sound", config.sample_sound)
#                        style "soundtest_button"

#            frame:
#                style_group "pref"
#                has vbox

#                label _("Voice Volume")
#                bar value Preference("voice volume")

#                if config.sample_voice:
#                    textbutton "Test":
#                        action Play("voice", config.sample_voice)
#                        style "soundtest_button"

init -2 python:
    
    #OLD. STILL USABLE THOUGH DEPENDING ON CURRENT THEME!!!!
#    style.pref_frame.xfill = True
#    style.pref_frame.xmargin = 5
#    style.pref_frame.top_margin = 5

#    style.pref_vbox.xfill = True

#    style.pref_button.size_group = "pref"
#    style.pref_button.xalign = 1.0

#    style.pref_slider.xmaximum = 192
#    style.pref_slider.xalign = 1.0

#    style.soundtest_button.xalign = 1.0
    
    #QQQQ
    style.pref_slider.left_bar = "images/dummy/slider_right.png"
    style.pref_slider.right_bar = "images/dummy/slider_left.png"

    style.pref_slider.xmaximum = 162    # width of your left_bar image.
    style.pref_slider.ymaximum = 30    # height of your left_bar image.  Probably will be the height of the red part of the bar plus the slider's height.

    style.pref_slider.thumb = "images/dummy/pixel.png"
    style.pref_slider.thumb_offset = 1    # Half of your thumb's width in pixels
    style.pref_slider.thumb_shadow = None


##############################################################################
# Yes/No Prompt
#
# Screen that asks the user a yes or no question.
# http://www.renpy.org/doc/html/screen_special.html#yesno-prompt
    
screen yesno_prompt:

    zorder 105
    modal True

    imagemap:
            ground "images/dummy/yesno_ground.png"
            hover "images/dummy/yesno_hover.png"
            idle "images/dummy/yesno_idle.png"
            alpha False

            hotspot (62, 54, 89, 37) action yes_action
            hotspot (229, 54, 89, 37) action no_action
    
    # can be removed
    label _(message):
        text_style "yesno_label_text"
        xalign 0.5
        yalign 0.475
        
    #OLD
#    modal True

#    window:
#        style "gm_root"

#    frame:
#        style_group "yesno"

#        xfill True
#        xmargin .05
#        ypos .1
#        yanchor 0
#        ypadding .05
        
#        has vbox:
#            xalign .5
#            yalign .5
#            spacing 30
            
#        label _(message):
#            xalign 0.5

#        hbox:
#            xalign 0.5
#            spacing 100
            
#            textbutton _("Yes") action yes_action
#            textbutton _("No") action no_action


init -2 python:    
    style.yesno_button.size_group = "yesno"
    style.yesno_label_text.text_align = 0.5
    
    #QQQQ
    style.yesno_label_text.color = "#b78748"
    style.yesno_label_text.font = "thy.ttf"
    style.yesno_label_text.line_leading = 1
    style.yesno_label_text.line_spacing = 0  


##############################################################################
# Quick Menu (NEVER EXISTED?)
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:

    # Add an in-game quick menu.
    hbox:
        style_group "quick"
    
        xalign 1.0
        yalign 1.0

        textbutton _("Q.Save") action QuickSave()
        textbutton _("Q.Load") action QuickLoad()
        textbutton _("Save") action ShowMenu('save')
        textbutton _("Skip") action Skip()
        textbutton _("Auto") action Preference("auto-forward", "toggle")
        textbutton _("Prefs") action ShowMenu('preferences')
        
init -2 python:
    style.quick_button.set_parent('default')
    style.quick_button.background = None
    style.quick_button.xpadding = 5

    style.quick_button_text.set_parent('default')
    style.quick_button_text.size = 12
    style.quick_button_text.idle_color = "#8888"
    style.quick_button_text.hover_color = "#ccc"
    style.quick_button_text.selected_idle_color = "#cc08"
    style.quick_button_text.selected_hover_color = "#cc0"
    style.quick_button_text.insensitive_color = "#4448"
    
    # Set a default value for the auto-forward time, and note that AFM is
    # turned off by default.
    config.default_afm_time = 10
    config.default_afm_enable = False
    
    
